#include <stdio.h> 
#include <sys/types.h> 

#ifdef BYTE_ORDER
    #define bb "xxx"
#endif

#if (BYTE_ORDER == BIG_ENDIAN)
//#if (BYTE_ORDER == LITTLE_ENDIAN)
    #define aa "big endian"
#else
    #define aa "little endian"
#endif

union test {
    int a;
    char ch[16];
};

int main(int argc, char **argv) {
    printf("%s\n", aa);
    printf("%s\n", bb);

    union test t;
    t.a = 1;
    printf("%d\n", t.ch[0]);
    return 0;
}
